home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADAP.IN_ / oemnadap.inf
INI File  |  1996-07-12  |  42KB  |  1,176 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     PCI
  7. [Options]
  8.     AMDPCI
  9. [FileConstants]
  10. GenericInfVersion  = " v3.11"
  11. GenericSysName     = "amdpcn.sys"
  12. GenericName        = "AMDPCN"
  13. UtilityInf      = "UTILITY.INF"
  14. ParamInf        = "NCPARAM.INF"
  15. subroutineinf   = "SUBROUTN.INF"
  16. SoftwareType    = "driver"
  17. Exit_Code       = 0
  18. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  19. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  20. Manufacturer    = "Microsoft"
  21. ProductMajorVersion     = "4"
  22. ProductMinorVersion     = "0"
  23. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  24. ProductSoftwareName     = "AMDPCN"
  25. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\"$(GenericSysName)
  26. NetRuleSoftwareType     = "pcntn3Sys ndisDriver pcntn3Driver"
  27. NetRuleSoftwareUse      = $(SoftwareType)
  28. NetRuleSoftwareBindForm = """pcntn3Sys"" yes no container"
  29. NetRuleSoftwareClass    = {"pcntn3Driver basic"}
  30. NetRuleSoftwareBindable = {"pcntn3Driver pcntn3Adapter non exclusive 100"}
  31. ProductHardwareName        = "AMDPCN"
  32. NetRuleHardwareType        = "pcntn3 pcntn3Adapter"
  33. NetRuleHardwareBindForm    = " yes yes container"
  34. NetRuleHardwareClass       = {"pcntn3Adapter basic"}
  35. ProductOpSupport     = 134 
  36. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  37. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  38. [GeneralConstants]
  39. from      = ""
  40. to        = ""
  41. ExitCodeOk     = 0
  42. ExitCodeCancel = 1
  43. ExitCodeFatal  = 2
  44. KeyNull         = ""
  45. MAXIMUM_ALLOWED   = 33554432
  46. RegistryErrorIndex = NO_ERROR
  47. KeyProduct      = ""
  48. KeyParameters   = ""
  49. TRUE            = 1
  50. FALSE           = 0
  51. NoTitle         = 0
  52. ExitState   = "Active"
  53. OldVersionExisted = $(FALSE)
  54. DriverPath      = $(!STF_NTPATH)\drivers
  55. [date]
  56.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  57. [Identify]
  58.     read-syms Identification
  59.     set Status     = STATUS_SUCCESSFUL
  60.     set Identifier = $(OptionType)
  61.     set Media      = #("Source Media Descriptions", 1, 1)
  62.     Return $(Status) $(Identifier) $(Media)
  63. [ReturnOptions]
  64.     set Status        = STATUS_FAILED
  65.     set OptionList     = {}
  66.     set OptionTextList = {}
  67.     set LanguageList = ^(LanguagesSupported, 1)
  68.     Ifcontains(i) $($0) in $(LanguageList)
  69.     ifstr(i) $($1) == ""
  70.             goto returnoptions
  71.     endif
  72.     set PlatformList = ^(PlatformsSupported, 1)
  73.     Ifcontains(i) $($1) in $(PlatformList)
  74.             goto returnoptions
  75.     else
  76.             set Status = STATUS_NOTSUPPORTED
  77.             goto finish_ReturnOptions
  78.     endif
  79.     else
  80.         set Status = STATUS_NOLANGUAGE
  81.         goto finish_ReturnOptions
  82.     endif
  83. returnoptions = +
  84.     set OptionList     = ^(Options, 1)
  85.     set OptionTextList = ^(OptionsText$($0), 1)
  86.     set Status         = STATUS_SUCCESSFUL
  87. finish_ReturnOptions = +
  88.     Return $(Status) $(OptionList) $(OptionTextList)
  89. [InstallOption]
  90.     set Status   = STATUS_FAILED
  91.     set Option   = $($1)
  92.     set SrcDir   = $($2)
  93.     set AddCopy  = $($3)
  94.     set DoCopy   = $($4)
  95.     set DoConfig = $($5)
  96.     set LanguageList = ^(LanguagesSupported, 1)
  97.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  98.     Return STATUS_NOLANGUAGE
  99.     endif
  100.     set-subst LF = "\n"
  101.     read-syms GeneralConstants
  102.     read-syms FileConstants
  103.     read-syms FileConstants$(!STF_LANGUAGE)
  104.     read-syms DialogConstants$(!STF_LANGUAGE)
  105.     ifstr(i) $(!NTN_Origination) == "NCPA"
  106.     set Continue = $(OK)
  107.     endif
  108.     detect date
  109.     set-title  $(FunctionTitle)
  110.     set to   = Begin
  111.     set from = Begin
  112.     set CommonStatus = STATUS_SUCCESSFUL
  113.     EndWait
  114. Begin = +
  115.     Set ActivateDetection = FALSE
  116.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  117.     set StartLabel = removeadapter
  118.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  119.     set StartLabel = UpgradeSoftware
  120.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  121.     set StartLabel = bindingadapter
  122.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  123.     set StartLabel = configureadapter
  124.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  125.         Debug-Output "Cannot configure the PCNet family driver software."
  126.         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  127.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  128.         Debug-Output "ShellCode error: cannot get an error string."
  129.         goto ShellCodeError
  130.         endif
  131.         set Error = $($R0)
  132.         set from = end
  133.         set to = end
  134.         goto nonfatalinfo
  135.     endif
  136.     else
  137.     set StartLabel = installadapter
  138.     set OEM_ABANDON_OPTIONS = {}
  139.     set OEM_ABANDON_SOFTWARE = FALSE
  140.     set OEM_ABANDON_ON = TRUE
  141.     endif
  142.     set IRQValue = *($(IRQList), 9)
  143.     set IOBaseAddrValue = *($(IOBaseAddrList), 17)
  144.     set DMAChannelValue = *($(DMAChannelList), 5)
  145.     set RadioIn  = {4}
  146.     set BusScanValue = "ALL"
  147.     set LED0Value = *($(LEDList), 1)
  148.     set LED1Value = *($(LEDList), 1)
  149.     set LED2Value = *($(LEDList), 1)
  150.     set LED3Value = *($(LEDList), 1)
  151.     set TPValue = 1
  152.     set FullDuplexValue = *($(FullDuplexList), 4)
  153.     set BusTimerValue = *($(BusTimerList), 10)
  154.     Set from = $(fatal)
  155.     Set to = $(fatal)
  156.     Goto $(StartLabel)
  157. installadapter = +
  158.     set IsISA = 0
  159.     set Vendor = 4130
  160.     set CardID = 8192
  161.     Shell $(UtilityInf), GetPCIInformation, $(Vendor) $(CardID)
  162.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  163.         goto ShellCodeError
  164.     endif
  165.     set AdapterList = $($R0)
  166.         set NewAdapterList = {}
  167.     set NumNew = 0
  168.     ForListDo $(AdapterList)
  169.         set BusNumber = *($($),1)
  170.         set SlotNum = *($($),2)
  171.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNumber), +
  172.         $(SlotNum), $(GenericPCIAdapterName), $(ProductHardwareName)
  173.         ifstr(i) $($R1) != "YES"
  174.             set-add NumNew = $(NumNew),1
  175.             ifstr(i) $(NewAdapterList) == {}
  176.                 set NewAdapterList = {$($)}
  177.             else
  178.                 set NewAdapterList = >($(NewAdapterList),$($))
  179.             endif
  180.         endif
  181.     EndForListDo
  182.     set AdapterList = $(NewAdapterList)
  183.     ifint $(NumNew) == 0
  184.         set AdapterList = {{0,0,0}}
  185.         set IsISA = 1
  186.     endif
  187.     debug-output $(AdapterList)
  188.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  189.     Ifstr $(KeyProduct) != $(KeyNull)
  190.     CloseRegKey $(KeyProduct)
  191.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  192.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  193.            $(ProductVersion)
  194.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  195.            Debug-Output "ShellCode error: cannot get an error string."
  196.            goto ShellCodeError
  197.        endif
  198.        goto end
  199.     else
  200.        Shell $(UtilityInf), CardExistedDlg
  201.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  202.            Debug-Output "ShellCode error: cannot get an error string."
  203.            goto ShellCodeError
  204.        endif
  205.        ifstr(i) $($R1) != "OK"
  206.            goto end
  207.        endif
  208.        set OldVersionExisted = $(TRUE)
  209.     endif
  210.     endif
  211.     ifint $(OldVersionExisted) == $(FALSE)
  212.     ifstr(i) $(!NTN_InstallMode) == "install"
  213.        Ifstr(i) $(DoCopy) == "YES"
  214.         Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) NO
  215.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  216.             Goto ShellCodeError
  217.         Else-Ifstr(i) $($R0) == STATUS_FAILED
  218.             Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  219.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  220.             goto ShellCodeError
  221.             endif
  222.             set Error = $($R0)
  223.             Goto fatal
  224.         Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  225.             Goto successful
  226.         Endif
  227.         Set SrcDir = $($R1)
  228.         endif
  229.         install "Install-Helpfile"
  230.     endif
  231.     endif
  232.     SetHelpFile "pcnet.hlp" 1 11
  233.     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  234.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  235.     Goto ShellCodeError
  236.     Else-Ifstr(i) $($R0) == STATUS_FAILED
  237.     Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  238.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  239.         goto ShellCodeError
  240.     endif
  241.     set Error = $($R0)
  242.     Goto fatal
  243.     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  244.     Goto successful
  245.     Endif
  246.     Set SrcDir = $($R1)
  247.     install "Install-Dll"
  248.     goto adaptersetup
  249. configureadapter = +
  250.     SetHelpFile "pcnet.hlp" 1 11
  251.     Ifstr $(KeyProduct) == $(KeyNull)
  252.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  253.     Ifstr $(KeyProduct) == $(KeyNull)
  254.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  255.         Debug-Output "Cannot find component product key"
  256.         goto fatalregistry
  257.     Endif
  258.     Endif
  259.     Debug-Output "INF: Shelling to FindService"
  260.     Shell $(UtilityInf) FindService, $(KeyProduct)
  261.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  262.     Debug-Output "INF: FindService shell failure"
  263.     Goto ShellCodeError
  264.     Endif
  265.     Ifstr(i) $($R0) != NO_ERROR
  266.     Debug-Output "INF: FindService Shell error: "$($R0)
  267.     Goto fatalregistry
  268.     endif
  269.     Set KeyParameters = $($R2)
  270.     CloseRegKey $($R1)
  271.     Ifstr $(KeyParameters) == $(KeyNull)
  272.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  273.     Debug-Output "Cannot find component service"
  274.     goto fatalregistry
  275.     endif
  276.     set OldVersionExisted = $(TRUE)
  277.     set ValueName = ""
  278.     set ValueData = ""
  279.     set ValueStr  = ""
  280.     set ValueList = {}
  281.     EnumRegValue $(KeyParameters) ValueList
  282.     ForListDo $(ValueList)
  283.     set ValueItem = $($)
  284.     set ValueName = *($(ValueItem),1)
  285.     set ValueData = *($(ValueItem),4)
  286.     ifstr(i) $(ValueName) == "BUS_TO_SCAN"
  287.         set BusScanValue = $(ValueData)
  288.     else-ifstr(i) $(ValueName) == "TP"
  289.         set TPValue = $(ValueData)
  290.     else-ifstr(i) $(ValueName) == "LED0"
  291.         set LED0Value = $(ValueData)
  292.     else-ifstr(i) $(ValueName) == "LED1"
  293.         set LED1Value = $(ValueData)
  294.     else-ifstr(i) $(ValueName) == "LED2"
  295.         set LED2Value = $(ValueData)
  296.     else-ifstr(i) $(ValueName) == "LED3"
  297.         set LED3Value = $(ValueData)
  298.     else-ifstr(i) $(ValueName) == "IOBaseAddress"
  299.         set IOBaseAddrValue = $(ValueData)
  300.     else-ifstr(i) $(ValueName) == "InterruptNumber"
  301.         set IRQValue = $(ValueData)
  302.     else-ifstr(i) $(ValueName) == "DMAChannel"
  303.         set DMAChannelValue = $(ValueData)
  304.     else-ifstr(i) $(ValueName) == "FDUP"
  305.         set FullDuplexValue = $(ValueData)
  306.     else-ifstr(i) $(ValueName) == "BUSTIMER"
  307.         set BusTimerValue = $(ValueData)
  308.     else-ifstr(i) $(ValueName) == "BusType"
  309.         set BusInterfaceType = $(ValueData)
  310.         ifint $(BusInterfaceType) == 5
  311.             set IsISA = 0
  312.         else
  313.             set IsISA = 1
  314.         endif
  315.     else-ifstr(i) $(ValueName) == "BusNumber"
  316.         set BusNumber = $(ValueData)
  317.     endif
  318.     EndForListDo
  319.     Ifint $(TPValue) == 0
  320.     Set CheckItemsIn = {"OFF"}
  321.     Else
  322.     Set CheckItemsIn = {"ON"}
  323.     Endif
  324.     Ifstr $(BusScanValue) == "PNP"
  325.     Set RadioIn = {1}
  326.     Else-Ifstr $(BusScanValue) == "VESA"
  327.     Set RadioIn = {2}
  328.     Else-Ifstr $(BusScanValue) == "ISA"
  329.     Set RadioIn = {3}
  330.     Else-Ifstr $(BusScanValue) == "ALL"
  331.     Set RadioIn = {4}
  332.     Else-Ifstr $(BusScanValue) == ""
  333.     Set RadioIn = {4}
  334.     Endif
  335.     Debug-Output $(InfName)" TP is "$(TPValue)
  336. ifint $(IsISA) == 1
  337.     set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValue)))
  338.     ifstr(i) $(IRQValue) == ""
  339.     set IRQValue = *($(IRQList), 2)
  340.     endif
  341.     Debug-Output $(InfName)" IRQ_Level is "$(IRQValue)
  342.     set DMAChannelValue = *($(DMAChannelList), ~($(DMAChannelValues),$(DMAChannelValue)))
  343.     ifstr(i) $(DMAChannelValue) == ""
  344.     set DMAChannelValue = *($(DMAChannelList), 2)
  345.     endif
  346.     Debug-Output $(InfName)" DMA is "$(DMAChannelValue)
  347.     set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrValue)))
  348.     ifstr(i) $(IOBaseAddrValue) == ""
  349.     set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  350.     endif
  351.     Debug-Output $(InfName)" I/o base is "$(IOBaseAddrValue)
  352. endif
  353.     set LED0Value = *($(LEDList), ~($(LEDValues),$(LED0Value)))
  354.     ifstr(i) $(LED0Value) == ""
  355.     set LED0Value = *($(LEDList), 1)
  356.     endif
  357.     Debug-Output $(InfName)" LED0 is "$(LED0Value)
  358.     set LED1Value = *($(LEDList), ~($(LEDValues),$(LED1Value)))
  359.     ifstr(i) $(LED1Value) == ""
  360.     set LED1Value = *($(LEDList), 1)
  361.     endif
  362.     Debug-Output $(InfName)" LED1 is "$(LED1Value)
  363.     set LED2Value = *($(LEDList), ~($(LEDValues),$(LED2Value)))
  364.     ifstr(i) $(LED2Value) == ""
  365.     set LED2Value = *($(LEDList), 1)
  366.     endif
  367.     Debug-Output $(InfName)" LED2 is "$(LED0Value)
  368.     set LED3Value = *($(LEDList), ~($(LEDValues),$(LED3Value)))
  369.     ifstr(i) $(LED3Value) == ""
  370.     set LED3Value = *($(LEDList), 1)
  371.     endif
  372.     Debug-Output $(InfName)" LED3 is "$(LED3Value)
  373.     set FullDuplexValue = *($(FullDuplexList), ~($(FullDuplexValues),$(FullDuplexValue)))
  374.     ifstr(i) $(FullDuplexValue) == ""
  375.     set FullDuplexValue = *($(FullDuplexList), 1)
  376.     endif
  377.     Debug-Output $(InfName)" Full Duplex is "$(FullDuplexValue)
  378.     set BusTimerValue = *($(BusTimerList), ~($(BusTimerValues),$(BusTimerValue)))
  379.     ifstr(i) $(BusTimerValue) == ""
  380.     set BusTimerValue = *($(BusTimerList), 1)
  381.     endif
  382.     Debug-Output $(InfName)" Bus Timer is "$(BusTimerValue)
  383. adaptersetup = +
  384.     Set from = adapteroptions
  385. adapteroptions = +
  386.     LoadLibrary "x" $(!STF_CWDDIR)\$(DialogDllName) hLib
  387. ifint $(IsISA) == 0
  388.     read-syms FileDependentDlgPCI$(!STF_LANGUAGE)
  389.     Debug-Output $(InfName)" TP is "$(TPValue)
  390.     Debug-Output $(InfName)" LED0 is "$(LED0Value)
  391.     Debug-Output $(InfName)" LED1 is "$(LED1Value)
  392.     Debug-Output $(InfName)" LED2 is "$(LED2Value)
  393.     Debug-Output $(InfName)" LED3 is "$(LED3Value)
  394.     Debug-Output $(InfName)" Full Duplex is "$(FullDuplexValue)
  395.     Debug-Output $(InfName)" Bus Timer is "$(BusTimerValue)
  396.     ui start "Inputdlg" $(hLib)
  397. else
  398. debug-output "read the isa dialog"
  399.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  400.     Debug-Output $(InfName)" Bus is "$(BusScanValue)
  401.     Debug-Output $(InfName)" TP is "$(TPValue)
  402.     Debug-Output $(InfName)" LED0 is "$(LED0Value)
  403.     Debug-Output $(InfName)" LED1 is "$(LED1Value)
  404.     Debug-Output $(InfName)" LED2 is "$(LED2Value)
  405.     Debug-Output $(InfName)" LED3 is "$(LED3Value)
  406.     Debug-Output $(InfName)" DMA is "$(DMAChannelValue)
  407.     Debug-Output $(InfName)" I/o base is "$(IOBaseAddrValue)
  408.     Debug-Output $(InfName)" Full Duplex is "$(FullDuplexValue)
  409.     Debug-Output $(InfName)" Bus Timer is "$(BusTimerValue)
  410.     ui start "InputDlg"  $(hLib)
  411. endif
  412.     set ExitButton      = $(ButtonPressed)
  413.     Debug-Output " ButtonPressed "$(ButtonPressed)
  414. debug-output $(DLGEVENT)
  415.     FreeLibrary $(hLib)
  416.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  417. ifint $(IsISA) == 1
  418.         set IOBaseAddrValue = $(Combo1Out)
  419.         set IRQValueValue = $(Combo2Out)
  420.         set DMAChannelValue = $(Combo3Out)
  421.         set FullDuplexValue = $(Combo4Out)
  422.         set BusTimerValue = $(Combo5Out)
  423.         set ExitButton = $(ButtonPressed)
  424.         set BusIndex = *($(RadioOut),1)
  425. else
  426.         set FullDuplexValue = $(Combo1Out)
  427.         set BusTimerValue = $(Combo2Out)
  428.         set ExitButton = $(ButtonPressed)
  429.         set BusIndex = *($(RadioOut),1)
  430. endif
  431.         Ifint $(BusIndex) == 1
  432.             Set BusScanValue = "PNP"
  433.         else-Ifint $(BusIndex) == 2
  434.             Set BusScanValue = "VESA"
  435.         else-Ifint $(BusIndex) == 3
  436.             Set BusScanValue = "ISA"
  437.         else-Ifint $(BusIndex) ==  4
  438.             Set BusScanValue = "ALL"
  439.         Endif
  440.     Set Chk = *($(CheckItemsOut), 1)
  441.     Ifstr(i) $(Chk) == "ON"
  442.         Set TPValue = 1
  443.     Else
  444.         Set TPValue = 0
  445.     Endif
  446.         ui pop 1
  447.     else-ifstr(i) $(DLGEVENT) == "EXIT"
  448.         set CommonStatus = STATUS_USERCANCEL
  449.         Debug-Output "Action: exit. Bye."
  450.         ui pop 1
  451.         goto end
  452.     else
  453.         ui pop 1
  454.         Debug-Output "Action: unknown. Bye."
  455.         goto end
  456.     endif
  457.     Debug-Output " Combo list out "$(ComboListItemsOut)
  458. skipoptions =+
  459.     ifint $(OldVersionExisted) == $(TRUE)
  460.     ifstr(i) $(!NTN_InstallMode) == configure
  461.     Shell $(UtilityInf), GetBusTypeNum
  462.     set BusTypeNum = $($R1)
  463.     set BusNumberValue = 0
  464.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  465.     Debug-Output "ShellCode error."
  466.     goto ShellCodeError
  467.     endif
  468. debug-output "before write registry"
  469.     set DMAChannelValue = *($(DMAChannelValues), ~($(DMAChannelList),$(DMAChannelValue)))
  470.     set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueValue)))
  471.     set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrValue)))
  472.     set LED0Value = *($(LEDValues), ~($(LEDList),$(LED0Value)))
  473.     set LED1Value = *($(LEDValues), ~($(LEDList),$(LED1Value)))
  474.     set LED2Value = *($(LEDValues), ~($(LEDList),$(LED2Value)))
  475.     set LED3Value = *($(LEDValues), ~($(LEDList),$(LED3Value)))
  476.     set FullDuplexValue = *($(FullDuplexValues), ~($(FullDuplexList),$(FullDuplexValue)))
  477.     set BusTimerValue = *($(BusTimerValues), ~($(BusTimerList),$(BusTimerValue)))
  478.     ifint $(IsISA) == 0
  479.     set NewValueList = {{FDUP,  $(NoTitle),$(!REG_VT_DWORD),$(FullDuplexValue)},+
  480.             {BUSTIMER,  $(NoTitle),$(!REG_VT_DWORD),$(BusTimerValue)},+
  481.             {TP,    $(NoTitle),$(!REG_VT_DWORD),$(TPValue)}}
  482.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  483.     else
  484.     set NewValueList = {{BUS_TO_SCAN,$(NoTitle),$(!REG_VT_SZ),$(BusScanValue)},+
  485.             {FDUP,  $(NoTitle),$(!REG_VT_DWORD),$(FullDuplexValue)},+
  486.             {BUSTIMER,  $(NoTitle),$(!REG_VT_DWORD),$(BusTimerValue)},+
  487.             {TP,    $(NoTitle),$(!REG_VT_DWORD),$(TPValue)},+
  488.             {IOBaseAddress,  $(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)},+
  489.             {InterruptNumber,  $(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  490.             {DMAChannel, $(NoTitle),$(!REG_VT_DWORD),$(DMAChannelValue)}}
  491.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  492.     endif
  493.     CloseRegKey $(KeyParameters)
  494.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  495.     Debug-Output "ShellCode error."
  496.     goto ShellCodeError
  497.     endif
  498.     set RegistryErrorIndex = $($R0)
  499.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  500.     Debug-Output "Registry error: Add value list"
  501.     goto fatalregistry
  502.     endif
  503.     EndWait
  504.     goto successful
  505.     endif
  506.     endif
  507.     StartWait
  508.     ifint $(OldVersionExisted) == $(FALSE)
  509.     ifstr(i) $(!NTN_InstallMode) == "install"
  510.        Ifstr(i) $(DoCopy) == "YES"
  511.           Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  512.           Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  513.           Goto ShellCodeError
  514.           Else-Ifstr(i) $($R0) == STATUS_FAILED
  515.           Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  516.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  517.               goto ShellCodeError
  518.           endif
  519.           set Error = $($R0)
  520.           Goto fatal
  521.           Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  522.           Goto successful
  523.           Endif
  524.           Set SrcDir = $($R1)
  525.        Endif
  526.        install "Install-Option"
  527.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  528.           Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  529.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  530.           goto ShellCodeError
  531.           endif
  532.           set Error = $($R0)
  533.           goto fatal
  534.        endif
  535.     endif
  536.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  537.         $(ProductSoftwareName), +
  538.         $(ProductSoftwareName), +
  539.         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  540.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  541.         $(NetEventDLL)
  542.     Set OEM_ABANDON_SOFTWARE = TRUE
  543.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  544.         Debug-Output "ShellCode error"
  545.         goto ShellCodeError
  546.     endif
  547.     set RegistryErrorIndex = $($R0)
  548.     set KeyProduct      = $($R1)
  549.     Set SoftNetRulesKey = $($R2)
  550.     CloseRegKey $($R3)
  551.     CloseRegKey $($R4)
  552.     CloseRegKey $($R5)
  553.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  554.         EndWait
  555.         Debug-Output "Registry error: add software components"
  556.         CloseRegKey $(KeyProduct)
  557.         CloseRegKey $(SoftNetRulesKey)
  558.         goto fatalregistry
  559.     endif
  560.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  561.                {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  562.                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  563.                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  564.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  565.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  566.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  567.     Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  568.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  569.         Debug-Output "ShellCode error."
  570.         goto ShellCodeError
  571.     endif
  572.     set RegistryErrorIndex = $($R0)
  573.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  574.         EndWait
  575.         Debug-Output "Registry error: add value list."
  576.         CloseRegKey $(KeyProduct)
  577.         CloseRegKey $(SoftNetRulesKey)
  578.         goto fatalregistry
  579.     endif
  580.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  581.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  582.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  583.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  584.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  585.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  586.     Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  587.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  588.         Debug-Output "ShellCode error."
  589.         goto ShellCodeError
  590.     endif
  591.     set RegistryErrorIndex = $($R0)
  592.     CloseRegKey $(KeyProduct)
  593.     CloseRegKey $(SoftNetRulesKey)
  594.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  595.         EndWait
  596.         Debug-Output "Resgitry error: add value list."
  597.         goto fatalregistry
  598.     endif
  599.     endif
  600.     debug-output $(AdapterList)
  601.     ForListDo $(AdapterList)
  602.         set BusNumber = *($($),1)
  603.         set DeviceNum = *($($),2)
  604.         set FunctionNum = *($($),3)
  605.         Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  606.         ifint $($R4) != -1
  607.             Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  608.         endif
  609.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  610.             Debug-Output "Cannot add hardware component"
  611.             goto ShellCodeError
  612.         endif
  613.         set RegistryErrorIndex = $($R0)
  614.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  615.             EndWait
  616.             Debug-Output "Registry error: add hardware component"
  617.             CloseRegKey $($R1)
  618.             CloseRegKey $($R2)
  619.             CloseRegKey $($R3)
  620.             goto fatalregistry
  621.         endif
  622.         set KeyParameters = $($R3)
  623.         set KeyAdapterRules = $($R2)
  624.         set AdapterNumber = $($R4)
  625.         ifint $(IsISA) == 1
  626.             set HardwareDescription = $(GenericAdapterName)
  627.             set HardwareTitle = $(GenericAdapterName)
  628.         else
  629.             set HardwareDescription = $(GenericPCIAdapterName)
  630.             set HardwareTitle = $(GenericPCIAdapterName)
  631.         endif
  632.         set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  633.                    {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(HardwareTitle)},+
  634.                    {Description,$(NoTitle),$(!REG_VT_SZ),$(HardwareDescription)},+
  635.                    {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  636.                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  637.                    {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  638.                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  639.         Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  640.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  641.             Debug-Output "ShellCode error"
  642.             goto ShellCodeError
  643.         endif
  644.         CloseRegKey $($R1)
  645.         set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  646.         set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  647.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  648.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  649.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  650.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  651.         Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  652.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  653.             Debug-Output "ShellCode error."
  654.             goto ShellCodeError
  655.         endif
  656.         set RegistryErrorIndex = $($R0)
  657.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  658.             EndWait
  659.             Debug-Output "Resgitry error: add value list."
  660.             CloseRegKey $(KeyParameters)
  661.             CloseRegKey $(KeyAdapterRules)
  662.             goto fatalregistry
  663.         endif
  664.         CloseRegKey $(KeyAdapterRules)
  665.         goto writeparameters
  666. writeparameters = +
  667.         Shell $(UtilityInf), GetBusTypeNum
  668.         set BusTypeNum = $($R1)
  669.         set BusNumberValue = 0
  670.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  671.             Debug-Output "ShellCode error."
  672.             goto ShellCodeError
  673.         endif
  674.         debug-output "before write registry"
  675.         set DMAChannelValue = *($(DMAChannelValues), ~($(DMAChannelList),$(DMAChannelValue)))
  676.         set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueValue)))
  677.         set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrValue)))
  678.         set LED0Value = *($(LEDValues), ~($(LEDList),$(LED0Value)))
  679.         set LED1Value = *($(LEDValues), ~($(LEDList),$(LED1Value)))
  680.         set LED2Value = *($(LEDValues), ~($(LEDList),$(LED2Value)))
  681.         set LED3Value = *($(LEDValues), ~($(LEDList),$(LED3Value)))
  682.         set FullDuplexValue = *($(FullDuplexValues), ~($(FullDuplexList),$(FullDuplexValue)))
  683.         set BusTimerValue = *($(BusTimerValues), ~($(BusTimerList),$(BusTimerValue)))
  684.         ifint $(IsISA) == 0
  685.             set NewValueList = {{BusType,$(NoTitle),$(!REG_VT_DWORD),5},+
  686.                 {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  687.                 {LED0,  $(NoTitle),$(!REG_VT_DWORD),$(LED0Value)},+
  688.                 {LED1,  $(NoTitle),$(!REG_VT_DWORD),$(LED1Value)},+
  689.                 {LED2,  $(NoTitle),$(!REG_VT_DWORD),$(LED2Value)},+
  690.                 {LED3,  $(NoTitle),$(!REG_VT_DWORD),$(LED3Value)},+
  691.                 {FDUP,  $(NoTitle),$(!REG_VT_DWORD),$(FullDuplexValue)},+
  692.                 {BUSTIMER,  $(NoTitle),$(!REG_VT_DWORD),$(BusTimerValue)},+
  693.                 {TP,    $(NoTitle),$(!REG_VT_DWORD),$(TPValue)},+
  694.                             {AdapterCFID,$(NoTitle),$(!REG_VT_DWORD),536875042},+
  695.                 {SlotNumber, $(NoTitle),$(!REG_VT_DWORD),$(DeviceNum)},+
  696.                 {BusNumber,  $(NoTitle),$(!REG_VT_DWORD),$(BusNumber)}}
  697.             Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  698.         else
  699.             set NewValueList = {{BUS_TO_SCAN,$(NoTitle),$(!REG_VT_SZ),$(BusScanValue)},+
  700.                 {BusType,$(NoTitle),$(!REG_VT_DWORD),1},+
  701.                 {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  702.                 {LED0,  $(NoTitle),$(!REG_VT_DWORD),$(LED0Value)},+
  703.                 {LED1,  $(NoTitle),$(!REG_VT_DWORD),$(LED1Value)},+
  704.                 {LED2,  $(NoTitle),$(!REG_VT_DWORD),$(LED2Value)},+
  705.                 {LED3,  $(NoTitle),$(!REG_VT_DWORD),$(LED3Value)},+
  706.                 {FDUP,  $(NoTitle),$(!REG_VT_DWORD),$(FullDuplexValue)},+
  707.                 {BUSTIMER,  $(NoTitle),$(!REG_VT_DWORD),$(BusTimerValue)},+
  708.                 {TP,    $(NoTitle),$(!REG_VT_DWORD),$(TPValue)},+
  709.                 {IOBaseAddress,  $(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)},+
  710.                 {InterruptNumber,  $(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  711.                 {DMAChannel, $(NoTitle),$(!REG_VT_DWORD),$(DMAChannelValue)},+
  712.                 {BusNumber,  $(NoTitle),$(!REG_VT_DWORD),$(BusNumber)}}
  713.             Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  714.         endif
  715.         CloseRegKey $(KeyParameters)
  716.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  717.             Debug-Output "ShellCode error."
  718.             goto ShellCodeError
  719.         endif
  720.         set RegistryErrorIndex = $($R0)
  721.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  722.             Debug-Output "Registry error: Add value list"
  723.             goto fatalregistry
  724.     endif
  725.     EndForListDo
  726.     EndWait
  727.     goto successful
  728. bindingadapter =+
  729.     set Error = "Binding: Sorry, not yet implemented."
  730.     goto fatal
  731. removeadapter = +
  732.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  733.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  734.         $(ProductSoftwareName)
  735.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  736.         Debug-Output "ShellCode error"
  737.         goto ShellCodeError
  738.     endif
  739.     set RegistryErrorIndex = $($R0)
  740.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  741.         goto fatalregistry
  742.     endif
  743.     else
  744.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  745.         $(ProductSoftwareName), $(!NTN_RegBase)
  746.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  747.         Debug-Output "ShellCode error"
  748.         goto ShellCodeError
  749.     endif
  750.     set RegistryErrorIndex = $($R0)
  751.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  752.         goto fatalregistry
  753.     endif
  754.     endif
  755.     goto end
  756. UpgradeSoftware = +
  757.     LoadLibrary "x" $(!STF_CWDDIR)\ncpa.cpl NCPA_HANDLE
  758.     OpenRegKey $(!REG_H_LOCAL) "" "Software\Microsoft\PCNTN3" $(MAXIMUM_ALLOWED) KeyProduct
  759.     Ifstr $(KeyProduct) != $(KeyNull)
  760.         DeleteRegTree $(KeyProduct) ""
  761.         LibraryProcedure NCPA_RESULT $(NCPA_HANDLE), CPlSetup $(!STF_HWND), DELETESVC, "PCNTN3"
  762.         set NetworkCardKeyName = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  763.             OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardKeyName) $(MAXIMUM_ALLOWED) IE_KeyNetcards
  764.         ifstr(i) $(IE_KeyNetcards) != ""    
  765.             EnumRegKey $(IE_KeyNetcards) IE_KeyNameList
  766.             ForListDo $(IE_KeyNameList)
  767.                 OpenRegKey $(IE_KeyNetcards) "" *($($),1) +
  768.                     $(MAXIMUM_ALLOWED) NetworkCardKey
  769.                 Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  770.                     GetRegValue $(NetworkCardKey),"ProductName", ProductNameInfo
  771.                     set ProductName = *($(ProductNameInfo), 4)
  772.                     Debug-Output "   ProductName = "$(ProductName)
  773.                     ifstr(i) $(ProductName) != "PCNTN3"
  774.                         goto nextnetcard
  775.                     endif
  776.                     GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  777.                     set ServiceName = *($(ServiceNameInfo), 4)
  778.                     Debug-Output "   ServiceName = "$(ServiceName)
  779.                     OpenRegKey $(!REG_H_LOCAL) "" "System\CurrentControlSet\Services\"$(ServiceName) +
  780.                           $(MAXIMUM_ALLOWED) ServiceKey
  781.                 DeleteRegTree $(ServiceKey) ""
  782.                 DeleteRegTree $(NetworkCardKey) ""
  783.                 endif
  784.     nextnetcard = +
  785.             EndForListDo
  786.         endif    
  787.         OpenRegKey $(!REG_H_LOCAL) "" "Software\Microsoft\AMDPCI" $(MAXIMUM_ALLOWED) KeyProduct2
  788.         ifstr $(KeyProduct2) == $(KeyNull)
  789.             LibraryProcedure NCPA_RESULT $(NCPA_HANDLE), CPlSetup $(!STF_HWND), STARTSVC, NetDetect
  790.             set !NTN_InstallMode = Install
  791.             Shell "" InstallOption $(!STF_LANGUAGE) "AMDPCI" $(SrcDir) "YES" "YES" "NO"
  792.             set !NTN_InstallMode = Update
  793.         else
  794.         endif
  795.     else
  796.     endif
  797.     FreeLibrary $(NCPA_HANDLE)
  798.     goto end
  799. successful = +
  800.     goto end
  801. abandon = +
  802.     ForListDo $(OEM_ABANDON_OPTIONS)
  803.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  804.         $(ProductSoftwareName), $($)
  805.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  806.         Debug-Output "ShellCode error"
  807.         goto ShellCodeError
  808.     endif
  809.     set RegistryErrorIndex = $($R0)
  810.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  811.         goto fatalregistry
  812.     endif
  813.     EndForListDo
  814.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  815.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  816.         $(ProductSoftwareName), FALSE
  817.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  818.         Debug-Output "ShellCode error"
  819.         goto ShellCodeError
  820.     endif
  821.     set RegistryErrorIndex = $($R0)
  822.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  823.         goto fatalregistry
  824.     endif
  825.     endif
  826.     goto end
  827. warning = +
  828.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  829.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  830.     goto ShellCodeError
  831.     endif
  832.     ifstr(i) $($R1) == "OK"
  833.     goto $(to)
  834.     else-ifstr(i) $($R1) == "CANCEL"
  835.     goto $(from)
  836.     else
  837.     goto "end"
  838.     endif
  839. nonfatalinfo = +
  840.     Set Severity = STATUS
  841.     Set CommonStatus = STATUS_USERCANCEL
  842.     goto nonfatalmsg
  843. nonfatal = +
  844.     Set Severity = NONFATAL
  845.     goto nonfatalmsg
  846. nonfatalmsg = +
  847.     ifstr(i) $(Error) == ""
  848.     Set Severity = NONFATAL
  849.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  850.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  851.         goto ShellCodeError
  852.     endif
  853.     set Error = $($R0)
  854.     endif
  855.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  856.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  857.     goto ShellCodeError
  858.     endif
  859.     ifstr(i) $($R1) == "OK"
  860.     goto $(from)
  861.     else
  862.     goto "end"
  863.     endif
  864. fatalregistry = +
  865.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  866.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  867.     goto ShellCodeError
  868.     endif
  869.     set Error = $($R0)
  870.     goto fatal
  871. fataldetect = +
  872.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  873.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  874.     Debug-Output "ShellCode error: cannot get an error string."
  875.     goto ShellCodeError
  876.     endif
  877.     set Error = $($R0)
  878.     Goto fatal
  879. fatal = +
  880.     ifstr(i) $(Error) == ""
  881.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  882.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  883.         goto ShellCodeError
  884.     endif
  885.     set Error = $($R0)
  886.     endif
  887.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  888.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  889.     goto ShellCodeError
  890.     endif
  891.     goto setfailed
  892. ShellCodeError = +
  893.     set DlgType      = "MessageBox"
  894.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  895.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  896.     set STF_MB_TYPE  = 1
  897.     set STF_MB_ICON  = 3
  898.     set STF_MB_DEF   = 1
  899.     ui start "Error Message"
  900.     goto setfailed
  901. setfailed = +
  902.     set CommonStatus = STATUS_FAILED
  903.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  904.     set OEM_ABANDON_ON = FALSE
  905.     goto abandon
  906.     endif
  907.     goto end
  908. end = +
  909.     goto term
  910. term = +
  911.     Return $(CommonStatus)
  912. [DebugConfiguration]
  913.     Set InfName = "OEMNADAM.INF"
  914.     Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  915.     Debug-Output $(InfName)" IRQ_Level is "$(!p:IRQ_Level)
  916.     Debug-Output $(InfName)" IOBaseAddrValue is "$(!p:IOBaseAddrValue)
  917.     return
  918. [Install-Option]
  919.     set STF_VITAL = ""
  920.     ifstr(i) $(AddCopy) == "YES"
  921.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  922.     endif
  923.     ifstr(i) $(DoCopy) == "YES"
  924.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  925.        CopyFilesInCopyList
  926.     endif
  927.     Exit
  928. [Install-Update]
  929.    set STF_VITAL        = ""
  930.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  931.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  932.    AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  933.    AddSectionFilesToCopyList Files-hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
  934.    exit
  935. [Install-Helpfile]
  936.    Debug-Output "At Install-Helpfile"
  937.    set STF_VITAL        = ""
  938.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  939.    ifstr(i) $(AddCopy) == "YES"
  940.        AddSectionFilesToCopyList Files-hlp $(SrcDir) $(!STF_WINDOWSSYSPATH)
  941.    endif
  942.    ifstr(i) $(DoCopy) == "YES"
  943.       set !STF_NCPA_FLUSH_COPYLIST = TRUE
  944.       CopyFilesInCopyList
  945.    endif
  946.    exit
  947. [Install-Dll]
  948.    set STF_VITAL        = ""
  949.    ifstr(i) $(AddCopy) == "YES"
  950.        AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  951.    endif
  952.    ifstr(i) $(DoCopy) == "YES"
  953.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  954.        CopyFilesInCopyList
  955.    endif
  956.    exit
  957. [Source Media Descriptions]
  958.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  959. [Signature]
  960.     FileType = MICROSOFT_FILE
  961. [GetSignature]
  962.     read-syms Signature
  963.     return $(FileType)
  964. [ProductType]
  965. STF_PRODUCT  = LanmanNT
  966. STF_PLATFORM = I386
  967. [Files-Inf]
  968. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  969. [Files-AMDPCI]
  970. 1,AMDPCN.SYS , SIZE=999
  971. [Files-Dll]
  972. 1,AMDDLG.DLL , SIZE=999
  973. [Files-hlp]
  974. 1,PCNET.HLP , SIZE=999
  975. [LanguagesSupported]
  976.     ENG
  977. [OptionsTextENG]
  978.     AMDPCI     = "AMD PCNET Family Ethernet Adapter"
  979. [FileConstantsENG]
  980. ProCaption   = "Windows NT Setup"
  981. ProCancel    = "Cancel"
  982. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  983.                "Are you sure you want to cancel copying files?"
  984. ProCancelCap = "Network Setup Message"
  985. ProText1     = "Copying:"
  986. ProText2     = "To:"
  987. GenericAdapterName = "AMD PCNET ISA/VESA Ethernet Adapter"
  988. GenericPCIAdapterName = "AMD PCNET PCI Ethernet Adapter"
  989. GenericDriverName  = "AMD PCNET Family Ethernet Adapter Driver"
  990. ProductSoftwareDescription = $(GenericDriverName)
  991. ProductHardwareDescription = $(GenericAdapterName)
  992. ProductHardwarePCNTN3Description="AMD PCnet Family Driver"
  993. ProductSoftwareTitle =       $(GenericDriverName)
  994. ProductHardwarePCNTN3Title = $(GenericAdapterName)
  995. DialogDllName   = "amddlg.dll"
  996. IRQList  = ^(IRQChoices, 1)
  997. IRQValues = ^(IRQChoices, 2)
  998. IOBaseAddrList = ^(IOBaseAddrChoices, 1)
  999. IOBaseAddrValues = ^(IOBaseAddrChoices, 2)
  1000. DMAChannelList = ^(DMAChannelChoices,1)
  1001. DMAChannelValues = ^(DMAChannelChoices,2)
  1002. LEDList = ^(LEDChoices,1)
  1003. LEDValues = ^(LEDChoices,2)
  1004. FullDuplexList = ^(FullDuplexChoices,1)
  1005. FullDuplexValues = ^(FullDuplexChoices,2)
  1006. BusTimerList = ^(BusTimerChoices,1)
  1007. BusTimerValues = ^(BusTimerChoices,2)
  1008. [DialogConstantsENG]
  1009. FunctionTitle   = $(GenericDriverName)$(GenericInfVersion)
  1010. Help        = "&Help"
  1011. Exit        = "Cance&l"
  1012. OK          = "&OK"
  1013. HelpContext = ""
  1014. Continue    = "C&ontinue"
  1015. Cancel      = "&Cancel"
  1016. [MemoryMappedChoicesENG]
  1017. Map_1 = 1, "ON"
  1018. Map_2 = 0, "OFF"
  1019. [FileDependentDlgENG]
  1020. FunctionTitle   = $(GenericAdapterName)$(GenericInfVersion)
  1021. DlgText = "Please select values for the following fields:"
  1022. Combo1Label = "&I/O Port:"
  1023. Combo2Label = "IRQ &Number:"
  1024. Combo3Label = "&DMA Number:"
  1025. Combo4Label = "&Full Duplex:"
  1026. Combo5Label = "&Bus Timer:"
  1027. BigButton   = "&More options >>"
  1028. CheckBox1 = "10Base-&T port"
  1029. Group1 = "&Bus to scan"
  1030. Radio1 = "&PNP"
  1031. Radio2 = "&VESA"
  1032. Radio3 = "&ISA"
  1033. Radio4 = "&ALL"
  1034. DlgType = "RadioCombination"
  1035. DlgTemplate = "PCNTN3"
  1036. Caption = $(FunctionTitle)
  1037. CBOptionsGreyed = {}
  1038. NotifyFields = {NO, NO}
  1039. HelpContext = 1
  1040. Combo1List = $(IOBaseAddrList)
  1041. Combo1Out  = $(IOBaseAddrValue)
  1042. Combo2List = $(IRQList)
  1043. Combo2Out  = $(IRQValue)
  1044. Combo3List = $(DMAChannelList)
  1045. Combo3Out  = $(DMAChannelValue)
  1046. Combo4List = $(FullDuplexList)
  1047. Combo4Out  = $(FullDuplexValue)
  1048. Combo5List = $(BusTimerList)
  1049. Combo5Out  = $(BusTimerValue)
  1050. ComboListItemsIn  = {Combo1List,Combo2List,Combo3List,Combo4List,Combo5List}
  1051. ComboListItemsOut = {Combo1Out,Combo2Out,Combo3Out,Combo4Out,Combo5Out}
  1052. EditTextIn = ""
  1053. EditTextLim = ""
  1054. [IRQChoices]
  1055. IRQ_1 = "3",3
  1056. IRQ_2 = "4",4
  1057. IRQ_3 = "5",5
  1058. IRQ_4 = "9",9
  1059. IRQ_5 = "10",10
  1060. IRQ_6 = "11",11
  1061. IRQ_7 = "12",12
  1062. IRQ_8 = "15",15
  1063. IRQ_9 = "Auto_Scan",0
  1064. [IOBaseAddrChoices]
  1065. IOBase_1  = "0x200",512
  1066. IOBase_2  = "0x220",544
  1067. IOBase_3  = "0x240",576
  1068. IOBase_4  = "0x260",608
  1069. IOBase_5  = "0x280",640
  1070. IOBase_6  = "0x2a0",672
  1071. IOBase_7  = "0x2c0",714
  1072. IOBase_8  = "0x2e0",746
  1073. IOBase_9  = "0x300",768
  1074. IOBase_10 = "0x320",800
  1075. IOBase_11 = "0x340",832
  1076. IOBase_12 = "0x360",864
  1077. IOBase_13 = "0x380",896
  1078. IOBase_14 = "0x3a0",928
  1079. IOBase_15 = "0x3c0",960
  1080. IOBase_16 = "0x3e0",992
  1081. IOBase_17 = "Auto_Scan",0
  1082. [DMAChannelChoices]
  1083. DMAChannel_1 = "3",3
  1084. DMAChannel_2 = "5",5
  1085. DMAChannel_3 = "6",6
  1086. DMAChannel_4 = "7",7
  1087. DMAChannel_5 = "Auto_Scan",0
  1088. [LEDChoices]
  1089. LED_1 = "Default",65536
  1090. LED_2 = "0x0",0
  1091. LED_3 = "0x2",2
  1092. LED_4 = "0x4",4
  1093. LED_5 = "0x8",8
  1094. LED_6 = "0x10",16
  1095. LED_7 = "0x20",32
  1096. LED_8 = "0x30",48
  1097. LED_9 = "0x34",52
  1098. LED_10 = "0x40",64
  1099. LED_11 = "0xc0",192
  1100. LED_12 = "0x4088",16520
  1101. LED_13 = "0xb0",176
  1102. LED_14 = "0x21",129
  1103. [FullDuplexChoices]
  1104. FULLDUPLEX_1 = "OFF",1
  1105. FULLDUPLEX_2 = "AUI",2
  1106. FULLDUPLEX_3 = "UTP",3
  1107. FULLDUPLEX_4 = "Default",0
  1108. [BusTimerChoices]
  1109. BUSTIMER_1 = "5",5
  1110. BUSTIMER_2 = "6",6
  1111. BUSTIMER_3 = "7",7
  1112. BUSTIMER_4 = "8",8
  1113. BUSTIMER_5 = "9",9
  1114. BUSTIMER_6 = "10",10
  1115. BUSTIMER_7 = "11",11
  1116. BUSTIMER_8 = "12",12
  1117. BUSTIMER_9 = "13",13
  1118. BUSTIMER_10 = "Default",0
  1119. [FileDependentDlgPCIENG]
  1120. FunctionTitle   = $(GenericPCIAdapterName)$(GenericInfVersion)
  1121. DlgText = "Please select values for the following fields:"
  1122. Combo1Label = "&Full Duplex:"
  1123. BigButton   = "&More options >>"
  1124. CheckBox1 = "10Base-&T port"
  1125. DlgType = "RadioCombination"
  1126. DlgTemplate = "PCNTN3PCI"
  1127. Caption = $(FunctionTitle)
  1128. CBOptionsGreyed = {}
  1129. NotifyFields = {NO, NO}
  1130. HelpContext = 1
  1131. Combo1List = $(FullDuplexList)
  1132. Combo1Out  = $(FullDuplexValue)
  1133. Combo3List = $(LEDList)
  1134. Combo3Out  = $(LED0Value)
  1135. Combo4List = $(LEDList)
  1136. Combo4Out  = $(LED1Value)
  1137. Combo5List = $(LEDList)
  1138. Combo5Out  = $(LED2Value)
  1139. Combo6List = $(LEDList)
  1140. Combo6Out  = $(LED3Value)
  1141. ComboListItemsIn  = {Combo1List}
  1142. ComboListItemsOut = {Combo1Out}
  1143. EditTextIn = ""
  1144. EditTextLim = ""
  1145. [LEDChoices]
  1146. LED_1 = "Default",65536
  1147. LED_2 = "0x0",0
  1148. LED_3 = "0x2",2
  1149. LED_4 = "0x4",4
  1150. LED_5 = "0x8",8
  1151. LED_6 = "0x10",16
  1152. LED_7 = "0x20",32
  1153. LED_8 = "0x30",48
  1154. LED_9 = "0x34",52
  1155. LED_10 = "0x40",64
  1156. LED_11 = "0xc0",192
  1157. LED_12 = "0x4088",16520
  1158. LED_13 = "0xb0",176
  1159. LED_14 = "0x21",129
  1160. [FullDuplexChoices]
  1161. FULLDUPLEX_1 = "OFF",1
  1162. FULLDUPLEX_2 = "AUI",2
  1163. FULLDUPLEX_3 = "UTP",3
  1164. FULLDUPLEX_4 = "Default",0
  1165. [BusTimerChoices]
  1166. BUSTIMER_1 = "5",5
  1167. BUSTIMER_2 = "6",6
  1168. BUSTIMER_3 = "7",7
  1169. BUSTIMER_4 = "8",8
  1170. BUSTIMER_5 = "9",9
  1171. BUSTIMER_6 = "10",10
  1172. BUSTIMER_7 = "11",11
  1173. BUSTIMER_8 = "12",12
  1174. BUSTIMER_9 = "13",13
  1175. BUSTIMER_10 = "Default",0
  1176.